﻿<%@ Page Language="C#" AutoEventWireup="True" MasterPageFile="~/Dummy.master" Codefile="CustomerLogin.aspx.cs" Inherits="Soveryn.Commerce.Pages.CustomerLogin" %>

<asp:Content ID="PageContent" ContentPlaceHolderID="PageContentPlaceHolder" runat="server">
    <h1>
        <asp:Literal ID="LoginMessageLiteral" runat="server" /></h1>
    <asp:UpdatePanel ID="MainUpdatePanel" runat="server">
        <ContentTemplate>
            <div class="block center" style="width: 400px; display: block;">
                <asp:Panel ID="CustomerLoginPnl" runat="server" DefaultButton="LoginButton" Width="100%">
                    <table cellpadding="10">
                        <tr>
                            <td align="right">Email Address: </td>
                            <td align="left">
                                <asp:TextBox ID="UserNameEmailTextBox" runat="server" ValidationGroup="loginGroup"
                                    Width="220"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="UserNameEmailRequired" runat="server" ControlToValidate="UserNameEmailTextBox"
                                    ErrorMessage="<br />Email address or user name is required." SetFocusOnError="true"
                                    Display="Dynamic" ValidationGroup="loginGroup"></asp:RequiredFieldValidator>
                                <asp:RequiredFieldValidator ID="UserNameEmailRequired2" runat="server" ControlToValidate="UserNameEmailTextBox"
                                    ErrorMessage="<br />Email address or user name is required." SetFocusOnError="true"
                                    Display="Dynamic" ValidationGroup="emailPasswordGroup"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="ValidInternetEmailRegExpVal" runat="server" ErrorMessage="<br />Must be a valid email address"
                                    Display="Dynamic" ControlToValidate="UserNameEmailTextBox" ValidationExpression="^([a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]){0,70}$"
                                    ValidationGroup="loginGroup"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">Password: </td>
                            <td align="left">
                                <asp:TextBox ID="PasswordTextBox" runat="server" TextMode="Password" ValidationGroup="loginGroup"
                                    Width="220"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="PasswordRequired" Display="None" runat="server" ControlToValidate="PasswordTextBox"
                                    ErrorMessage="<br />Password is required" SetFocusOnError="true" ValidationGroup="loginGroup"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td align="left">
                                <table>
                                    <tr>
                                        <td>
                                            <asp:LinkButton ID="LoginButton" runat="server" Text="Sign In" ValidationGroup="loginGroup"
                                                OnClick="LoginButton_Click" CssClass="buttonPositive" />
                                        </td>
                                        <td>
                                            <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="MainUpdatePanel"
                                                runat="server">
                                                <ProgressTemplate>
                                                    <img src="/Files/Themes/<%= Website.DesignFolder %>/loading.gif" alt="" />
                                                </ProgressTemplate>
                                            </asp:UpdateProgress>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" align="left">
                                <asp:Panel ID="EventMessagePanel" Visible="false" runat="server">
                                    <asp:Literal ID="EventMessagePanelLiteral" Visible="true" runat="server" Text="ForgotPWPanelResultLiteral" />
                                </asp:Panel>
                                <asp:Panel ID="ForgotPWPanel" runat="server">
                                    <asp:LinkButton ID="EmailPasswordLinkButton" runat="server" Text="Forgot password?"
                                        OnClick="EmailPasswordLinkButton_Click" ValidationGroup="emailPasswordGroup" />
                                </asp:Panel>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
